/*
 * Copyright (C) 2012  E-dance Studio Harbin Institute of Technology 
 * Project:campusmobile
 * Author: 初楷博
 * Create Date: 2012-6-3下午12:33:48
 */
package hit.edance.campusmobile.chat.listener;

import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.ChatManagerListener;

/**   
 * 聊天监听
 * 
 * @Project campusmobile
 * @Package hit.edance.campusmobile.chat.listener
 * @Class ChatManagerListenerEx
 * @Date 2012-6-3 下午12:33:48
 * @author 初楷博
 * @version 
 * @since 
 */
public class ChatManagerListenerEx implements ChatManagerListener {

	/* @see org.jivesoftware.smack.ChatManagerListener#chatCreated(org.jivesoftware.smack.Chat, boolean)
	 *chatCreated
	 */
	public void chatCreated(Chat chat, boolean createdLocally) {
		if(chat.getListeners().isEmpty())
			chat.addMessageListener(MessageListenerEx.getInstance());
	}

}
